package com.topfinance.cnaps2.ebo;

// Generated 2009-6-19 13:56:29 by Hibernate Tools 3.2.2.GA

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * SysDepartment generated by hbm2java
 */
@Entity
@Table(name = "T_SYS_USER")
public class SysUserEbo implements java.io.Serializable {

	//ID	主键	integer
	private Integer ID;

	//name	名称	varchar2(100)
	private String name;

	//loginname	名称	varchar2(100)
	private String loginname;

	//password	密码	varchar2(30)
	private String password;

	//oid	部门	integer
	private SysOrgEbo oRG;

	//phone	电话	varchar2(30)
	private String phone;

	//cell	手机	varchar2(30)
	private String cell;

	//email	邮件	varchar2(30)
	private String email;

	//Desc	备注	varchar2(256)
	private String desc;

	//createDate	创建时间	TIMEStamp
	private Date createDate;

	public SysUserEbo() {
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false)
	@SequenceGenerator(name = "SYS_USER_GEN", sequenceName = "S_SYS_USER")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "SYS_USER_GEN")
    public Integer getID() {
        return this.ID;
    }
    public void setID(Integer ID) {
        this.ID = ID;
    }

	@Column(name = "name")
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "loginname")
	public String getLoginname() {
		return loginname;
	}
	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	@Column(name = "password")
	public String getPassword() {
		return this.password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "oid")
    public SysOrgEbo getORG() {
        return this.oRG;
    }
    public void setORG(SysOrgEbo oRG) {
        this.oRG = oRG;
    }

    @Column(name = "cell")
	public String getCell() {
		return cell;
	}
	public void setCell(String cell) {
		this.cell = cell;
	}

	@Column(name = "createDate")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	@Column(name = "email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "phone")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "description")
	public String getDesc() {
		if (desc == null)
			return "";
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}

}
